package com.pro.service.imple;

import com.pro.dao.DictDataMapper;
import com.pro.entity.DictData;
import com.pro.entity.DictDataPlus;
import com.pro.entity.JsLogPlus;
import com.pro.service.DictDataService;
import com.pro.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.sql.Date;
import java.util.List;
import java.util.logging.Logger;

/**
 * @ClassName: DictDataServiceImple
 * @Author: 笑笑
 * @DATE: 2021/11/7
 * @TIME: 下午 08:56
 */
@Service
public class DictDataServiceImple implements DictDataService {

    @Autowired
    private DictDataMapper dictDataMapper;

    //查看商品操作日志
    @Override
    public List<DictDataPlus> getAllDictData(JsLogPlus dictData) {
        return dictDataMapper.getAllDictData(dictData);
    }

    //根据id删除商品操作日志
    @Transactional(rollbackFor = Exception.class)
    @Override
    public boolean deleteDictData(Integer id) throws Exception {
        if (id == null || id < 0){
            throw new Exception("id不正确");
        }
        return dictDataMapper.deleteDictData(id);
    }
}
